
cap pr drop labels
pr de labels
	la de `1' `2' "`3'", add
end	


loc var stus_flag	
cap la drop `var'	
loc l labels `var'
la de `var' 90	"Special cases (old cases: asylum without stay, etc.)"
`l'  80 	"AUG case completed (-)"
`l'  70	"AUG case in treatment (-)"
`l'  65	"Disposal from the asylum sector (-)"
`l'  60	"Regulation asylum / AUG (B, C, naturalizations)"
`l'  55	"Specialties (Open residence asylum, not process) (N)"
`l'  50	"Enforcement process (N)"
`l'  40	"Legally binding provisionally (F)"
`l'  30	"Right force process (N)"
`l'  20	"Asylum decision process (N)"
`l'  15	"Completed pre-process (-)"
`l'  10	"Preprocessing (-)"
   

loc var  arb_stell_cd  
cap la drop `var'
loc l labels `var'
la de `var' -2 "Without specification"
`l' -1  Unknown
`l' 1   "Self-employed persons (owners, owners, tenants)"
`l' 2   Director
`l' 3   Employees


loc var bra_typ_cd 
cap la drop `var' 
loc l labels `var'
la de `var' 93 "Embassies and international representations"
`l'  92 "State insurance"
`l'  91 "Authorities and administration"
`l'  89 "Domestic services"
`l'  88 "Leisure and entertainment"
`l'  87 "Associations, associations and parties"
`l'  86 "Religious and ideological associations"
`l'  85 "Dormitories and welfare care"
`l'  84 "Waste disposal and recycling"
`l'  83 "Medicine and healthcare"
`l'  82 "Research and Development"
`l'  81 "Education"
`l'  76 "Personal services"
`l'  75 "Commercial services"
`l'  74 "Rental of equipment and vehicles"
`l'  73 "Real estate brokerage and administration"
`l'  72 "Insurance"
`l'  71 "Banking industry"
`l'  66 "Message transfer"
`l'  65 "Transportation"
`l'  64 "Aviation"
`l'  63 "Shipping"
`l'  62 "Road traffic and pipelines"
`l'  61 "Tracks"
`l'  58 "Repairs"
`l'  57 "Catering"
`l'  56 "Retail trade"
`l'  55 "Retail trade in general"
`l'  54 "Intermediary general"
`l'  53 "Wholesale general"
`l'  52 "Wholesale trade"
`l'  51 "Wholesale trade of finished goods"
`l'  42 "Installations on construction"
`l'  41 "Construction industry"
`l'  38 "Other processing of materials"
`l'  37 "Watch industry"
`l'  36 "Precision mechanics"
`l'  35 "Machinery and vehicle construction"
`l'  34 "Metal processing"
`l'  33 "Glass, stones and earth"
`l'  32 "Plastics"
`l'  31 "Chemicals"
`l'  29 "Leather products"
`l'  28 "Publishing and printing"
`l'  27 "Paper manufacture"
`l'  26 "Wood processing"
`l'  25 "Clothing"
`l'  24 "Textile industry"
`l'  23 "Smoking articles"
`l'  22 "Drinks"
`l'  21 "Food"
`l'  12 "Mining"
`l'  11 "Energy-and water supply"
`l'  4  "Fishing"
`l'  3  "Forestry"
`l'  2  "Horticulture"
`l'  1  "Agriculture"
`l'  -1 "Unknown"
`l'  -2 "Without specification"
   


loc var evz_cd
cap la drop `var' 
loc l labels `var'
la de `var' -2 "Without specification"
`l'  -1 "Unknown"
`l'  1  "Kreuzlingen"
`l'  2  "Basel"
`l'  3  "Chiasso"
`l'  4  "Geneva"
`l'  5  "Altstätten"
`l'  6  "Goldswil"
`l'  7  "Gorgier"
`l'  8  "Arbedo"
`l'  9  "RZ test"
`l'  10 "Schmidrüti"
`l'  11 "Vallorbe"
`l'  12 "Airport Zurich-Kloten"
`l'  13 "Airport Geneva-Cointrin"
`l'  14 "BFM Request Family"
`l'  15 "BFM application prison"
`l'  16 "BFM Switzerland. message"
`l'  90 "Not about ES"
`l'  91 "National application"
 



recode ethn_cd 999=-1
recode ethn_cd 0=-2
recode ethn_cd (157 158 159 =152) // palestinian gaza + palestinian westbank + palestinian other

loc var ethn_cd 
cap la drop `var' 
loc l labels `var'
la de `var' 998 Other
`l'  498 Bilen
`l'  497 Ewe
`l'  494 Hazara
`l'  495 Diola
`l'  496 Dioula
`l'  493 "Torbes / Torbesh"
`l'  492 Tygrinya
`l'  491 Twa
`l'  490 Tukolor
`l'  489 Chechens
`l'  486 "Slavic Muslims"
`l'  485 Susu
`l'  484 "So so"
`l'  483 Soninke
`l'  482 Sinti
`l'  481 Sindhi
`l'  480 "Serer"
`l'  424 Mungala
`l'  423 Mossi
`l'  422 Montenegro
`l'  421 Mohajir
`l'  420 "Mande / Mende"
`l'  400 Kru
`l'  360 Gorani
`l'  329 Bissa
`l'  328 Burmese
`l'  327 Bini
`l'  326 Bihari
`l'  325 Batwa
`l'  324 Bassa
`l'  323 Banyambo
`l'  322 Bambara
`l'  321 Babudu
`l'  320 Bundo
`l'  301 Abkhazian
`l'  300 "Ashkali / Egyptian / Majup"
`l'  251 Tzigane
`l'  240 Yoruba
`l'  230 Xhosa
`l'  223 Wolof
`l'  222 Warsangali
`l'  221 "White russian"
`l'  204 Uzbek
`l'  203 Umbundu
`l'  202 Hungarian
`l'  201 Ukrainians
`l'  200 Uighurs
`l'  199 Temne
`l'  198 Tutsi
`l'  197 Tuareg
`l'  196 Tigriner
`l'  195 Tibetans
`l'  194 "Tadjikistan"
`l'  193 Turkmen
`l'  192 Circassians
`l'  191 Turks
`l'  190 Tamile
`l'  189 Saracolle
`l'  188 Senufo
`l'  187 Samaga
`l'  186 Somalis
`l'  185 Singhalese
`l'  184 Sheikhal
`l'  183 Slovenes
`l'  182 Serbs
`l'  181 Slovaks
`l'  174 Roma
`l'  173 "Rer hamar"
`l'  172 "Romanian / e Hungarian"
`l'  171 Russians
`l'  160 Quechua
`l'  156 Punjabi
`l'  155 "Peul (ful)"
`l'  154 Pashtuns
`l'  153 Persian
`l'  152 Palestinians
`l'  151 Pomak
`l'  145 Ossetians
`l'  143 Ogoni
`l'  142 Ovimbundu
`l'  141 Oromo
`l'  140 Ogaden
`l'  129 Malinke
`l'  128 Mongol
`l'  127 Muslims
`l'  126 Mukongo
`l'  125 Moldavian
`l'  124 Mina
`l'  123 Midgan
`l'  122 Marehan
`l'  121 Mandinko
`l'  120 Majeerts
`l'  113 Lithuanian
`l'  112 Limba
`l'  111 Lega
`l'  110 Lari
`l'  109 Kpelle
`l'  108 Kotokoli
`l'  107 kikongo
`l'  106 Kashmiri
`l'  105 Kabyl
`l'  104 Khran
`l'  103 Croats
`l'  102 Kurds
`l'  101 Lasen
`l'  94 Jat
`l'  93 Igbo. 
`l'  92 Issaq
`l'  91 Jews
`l'  82 Haussa
`l'  81 Hutu
`l'  80 Hawiye
`l'  76 Gio
`l'  75 Godaboursi
`l'  74 "Gal Gale"
`l'  73 "Greek. Turks"
`l'  72 Georgians
`l'  71 Greece
`l'  63 "Futa (old)"
`l'  62 Fulani
`l'  61 Futa
`l'  60 Fanti
`l'  52 "Esan / isan"
`l'  51 Edo
`l'  50 Elay
`l'  43 Dialonke
`l'  42 Dulbahante
`l'  41 Dir
`l'  40 Darod
`l'  31 Chakma
`l'  30 "Ceylon-Moor/Moors"
`l'  29 Berber
`l'  28 Bengali
`l'  27 Baluch
`l'  26 Bantu
`l'  25 Bamako
`l'  24 "Bakongo (Congo)"
`l'  23 Burying
`l'  22 "Turkish/Bulgarian"
`l'  21 Bosniaks
`l'  19 Afghan
`l'  18 Assyrians
`l'  17 Amhare
`l'  16 Afar
`l'  15 "Azerbaijani people"
`l'  14 Armenians
`l'  13 Arabs
`l'  12 Aramaeans
`l'  11 Albanian
`l'  10 Abgal
`l'  -1 Unknown
`l'  -2 "Without specification"
 


 
 
loc var ziv_cd
cap la drop `var' 
loc l labels `var'
la de `var' 12 "Death-resolved partnership"
`l'  11 "Judicially dissolved partnership"
`l'  10 "In a registered partnership"
`l'  9  Unknown
`l'  4  Divorced
`l'  3  Widowed
`l'  2  Married
`l'  1  Single
`l'  -1 Unknown
`l'  -2 "Without specification" 
  
 
ren reli_cd reli_cd_full
recode reli_cd_full 99=-1 //unknown +unknown code
recode reli_cd_full 0=-2 // without specification 
recode reli_cd_full 97=998 //same number all other


*group a few religions
g reli_cd=reli_cd_full
recode reli_cd (22 58 59 12 26 25 28 13 23 =11) //protestant
recode reli_cd (55 1 29 2 3 4 5=54) //catholic
recode reli_cd (6 7 8 9 10 18=53) //orthodox
recode reli_cd (33=32) //shia muslim
recode reli_cd (57 34 49=31) //sunni muslim


loc var reli_cd 
cap la drop `var' 
loc l labels `var'
la de `var' 98 "Without confession"
`l'  998 "Other"
`l'  60 "Nature religion"
`l'  59 "Free Evangelical"
`l'  58 Baptist
`l'  57 Chafii
`l'  56 Atheist
`l'  55 Apostolic
`l'  54 Catholic
`l'  53 Orthodox
`l'  52 Dissident
`l'  51 Hammalister
`l'  50 Senoussit
`l'  49 Tidjanist
`l'  48 "Traditionalists (Ghana)"
`l'  47 Taoist
`l'  46 Shintoist
`l'  45 Confucian
`l'  44 Sikh
`l'  43 Hindu
`l'  42 Jaina
`l'  41 Buddhist
`l'  40 Jew
`l'  39 Islam
`l'  38 Ismaelite
`l'  37 Bahai
`l'  36 Kharidijte
`l'  35 Druse
`l'  34 Hanefit
`l'  33 Alevite
`l'  32 Shiite
`l'  31 Sunnite
`l'  30 Kimbanguist
`l'  29 "Church of the christ Zaire"
`l'  28 "Pentecostal community"
`l'  27 "Jehovah's Witnesses"
`l'  26 Methodist
`l'  25 Anabaptism
`l'  24 Adventist
`l'  23 Presbyterian
`l'  22 Mormon
`l'  21 Ahmadi
`l'  20 "New Apostolic"
`l'  19 "Tocoists (Simao Toco)"
`l'  18 Armenian-Gregorian
`l'  17 Jeziden
`l'  16 Maronites
`l'  15 Copts
`l'  14 "Christian (general)"
`l'  13 Anglican
`l'  12 Evangelical-Reformed
`l'  11 Protestant
`l'  10 Serbian-orthodox
`l'  9 "Syrian Orthodox"
`l'  8 "Greek Orthodox"
`l'  7 "Russian Orthodox"
`l'  6 "Armenian Orthodox"
`l'  5 Greek-Catholic
`l'  4 "Syrian Catholic"
`l'  3 "Armenian Catholic"
`l'  2 Christian-Catholic
`l'  1 "Roman Catholic"
`l'  -1 Unknown
`l'  -2 "Without specification"



*new language groups added in later years, but some of them seem to overlap with previous ones
recode spr_cd 142 =68	// Ful + Peul (Peul seems to have included Ful before)
recode spr_cd (141 140 139 138 =50) //tibetan standard + tibetan amdo + tibetan kham + tibetan central
recode spr_cd 132 = 22 // Ewe + Ewe Ghana
recode spr_cd 147 = 95 // Rome +	Romanes
recode spr_cd 98=998 //same number all other
recode spr_cd 0=-2 // without specification
recode spr_cd 99=-1 // unknown

loc var spr_cd 
cap la drop `var' 
loc l labels `var'
la de `var' -2 "Without specification"
`l'  -1 Unknown
`l'  9 Sorani
`l'  10 Diola
`l'  11 Afghan
`l'  12 Albanian
`l'  13 Amharic
`l'  14 Arabic
`l'  15 Aramaic
`l'  16 Armenian
`l'  17 Bengali
`l'  18 Bulgarian
`l'  19 Chinese
`l'  20 Daganba
`l'  21 English
`l'  22 "Ewe (Ghana)"
`l'  23 Farsi
`l'  24 "Ga (Ghana)"
`l'  25 Greek
`l'  26 "Guang (Ghana)"
`l'  27 Haussa
`l'  28 Hindi
`l'  29 Cambodian
`l'  30 Kimbala
`l'  31 Kisuaheli
`l'  32 Kotokoli
`l'  33 Kurdish
`l'  34 Laotian
`l'  35 Lingala
`l'  36 Pashtou
`l'  37 Persian
`l'  38 Polish
`l'  39 Portuguese
`l'  40 Punjabi
`l'  41 Romanian
`l'  42 Russian
`l'  43 Serbo-Croatian
`l'  44 Singhalese
`l'  45 Slovak
`l'  46 Somali
`l'  47 Spanish
`l'  48 Swahili
`l'  49 Tamil
`l'  50 Tibetan
`l'  51 Tigrinya
`l'  52 Czech
`l'  53 Turkish
`l'  54 Twi
`l'  55 Hungarian
`l'  56 Urdu
`l'  57 Vietnamese
`l'  58 Yoruba
`l'  59 German
`l'  60 French
`l'  61 Italian
`l'  62 Dari
`l'  63 Edo
`l'  64 "Gio (liberia)"
`l'  65 Kikongo
`l'  66 Kimbundu
`l'  67 Mandinga
`l'  68 "Peul (ful, fulbe)"
`l'  69 Saracolle
`l'  70 Tshiluba
`l'  71 Wolof
`l'  72 Azerbaijani
`l'  73 "White Russian"
`l'  74 Croatian
`l'  75 Estonian
`l'  76 Georgian
`l'  77 Kazakh
`l'  78 Kyrgyz
`l'  79 Latvian
`l'  80 Lithuanian
`l'  81 Macedonian
`l'  82 Moldavian
`l'  83 Uzbek
`l'  84 Serbian
`l'  85 Slovenian
`l'  86 Tajik
`l'  87 Turkmen
`l'  88 Ukrainian
`l'  89 Baham
`l'  90 Burmese
`l'  91 Hebrew
`l'  92 Kranh
`l'  93 Mandarin
`l'  94 Nepali
`l'  95 Rome
`l'  96 Kinyarwanda
`l'  97 Zulu
`l'  100 Aghu
`l'  101 Bambara
`l'  102 Bassa
`l'  103 Berber
`l'  104 Bissa
`l'  105 Bini
`l'  106 Kreol
`l'  107 Dialonke
`l'  108 "Esan / Ishan"
`l'  109 "Igala / igara"
`l'  110 "Igbo (ibo)"
`l'  111 Kabyl
`l'  112 Kashmiri
`l'  113 Kirundi
`l'  114 Kissi
`l'  115 Kpele
`l'  116 Malinke
`l'  117 Mende
`l'  118 Mossi
`l'  119 Ogoni
`l'  120 Oromo
`l'  121 Senufo
`l'  122 serer
`l'  123 Soninke
`l'  124 Susu
`l'  125 Temne
`l'  126 Tukolor
`l'  127 Swahili
`l'  128 Mongolian
`l'  129 Bilen
`l'  130 Gorani
`l'  131 Badini
`l'  133 Kurmanci
`l'  134 Dioula
`l'  135 Chechen
`l'  143 Sarakhole	
`l'  987 "Test RZ"
`l'  998 Other

replace isa_kz="1" if regexm(isa_kz,"^D") // lack the exact coding, but all these are Dublin  
replace isa_kz=subinstr(isa_kz, "B", "",.)
replace isa_kz=subinstr(isa_kz, "_", "",.)
replace isa_kz="0" if isa_kz=="?"
replace isa_kz="-2" if isa_kz=="!"
destring isa_kz, replace
 
loc var isa_kz 
cap la drop `var' 
loc l labels `var'
la de `var' 41501 "AO Abs / Rest"
`l'  41401 "PB Abs / Req"
`l'  41301 "AO without asylum procedures"
`l'  41201 "PB without asylum procedures"
`l'  41101 "AO according to asylum procedures"
`l'  41001 "PB according to asylum procedures"
`l'  40802 "Departure period expired> 40 days (canton of canton)"
`l'  40801 "Time limit expired> 40 days"
`l'  40701 "Exit date expired <= 40 days"
`l'  40601 "Exit time"
`l'  40501 "Recourse asylum decision"
`l'  40401 "Complaint period running or RK outstanding"
`l'  40301 "First instance decision"
`l'  40201 "Hearing process Canton"
`l'  40101 "Hearing process Bund"
`l'  31902 "Special reasons for other reasons"
`l'  31901 "Specialties of the canton"
`l'  30901 "Special asylum"
`l'  30501 "Departure organization asylum"
`l'  30401 "Paper procurement asylum"
`l'  30310 "VA Refugees> 7 years"
`l'  30309 "VA Refugees = 7 years"
`l'  30308 "VA BRB / internment> 7 years"
`l'  30307 "VA BRB / internment = 7 years"
`l'  30306 "VA States> 7 years"
`l'  30305 "VA stateless person = 7 years"
`l'  30304 "VA AuG> 7 years"
`l'  30303 "VA AuG = 7 years"
`l'  30302 "VA AsylG> 7 years"
`l'  30301 "VA AsylG = 7 years"
`l'  20201 "Entry process"
`l'  20101 "Entry application process"
`l'  1002 "Suspension enforcement AuG (various reasons)"
`l'  1001 "Blocked enforcement AuG (Prison)"
`l'  207 "Displacement control (old)"
`l'  206 "Suspension enforcement (group)"
`l'  205 "Suspension of enforcement (a.o. Rechtsm. BFM)"
`l'  204 "Suspension of enforcement (a.o. Rechtsm. BVGer)"
`l'  203 "Blocked execution (country of origin)"
`l'  202 "Suspension of enforcement (individual case)"
`l'  201 "Blocked execution (Prison)"
`l'  101 "Treatment"
`l'  0  "Unlogical inventory, booking errors"
`l'  -2 "Without specification, not associated with any splitting"
`l'  1  "Dublin"     
         


loc var pz1_e_akt_cd
cap la drop `var' 
loc l labels `var'
la de `var' 510000 "Stay, regulation AuG after asylum"
`l'  510099 "Settlement regulation deactivated"
`l'  510100 "Stay, claim to FREPO regulation"
`l'  510200 "Residence, humanitarian settlement Article 31 VZAE"
`l'  510300 "Stay, FREPO regulation (without claim)"
`l'  510400 "Stay, hardship regulation Art. 14 al.2 AsylG"
`l'  510500 "Stay, regulation AuG after statelessness"
`l'  510600 "Residence, hardship regulation Art. 84.5 AuG"
`l'  510900 "Stay, naturalization"
`l'  511000 "Stay, departure"
`l'  511001 "Stay, traveled, traveled with REZ"
`l'  511002 "Stay, emigrated, with return assistance"
`l'  511010 "AO case"
`l'  511099 "Completion of exit / departure inactivated"
`l'  511100 "Stay, returned home"
`l'  511101 "Stay, returned to home state, DEPU (unaccompanied)"
`l'  511102 "Stay, returned to home state, DEPU (accompanied)"
`l'  511103 "Stay, returned home, special flight"
`l'  511110 "AuG case, returned to home state"
`l'  511111 "AuG case, returned to home state, DEPU (unaccompanied)"
`l'  511112 "AuG case, returned to home state, DEPU (accompanied)"
`l'  511113 "AuG case, returned to home state, special flight"
`l'  511200 "Stay, returned to third country"
`l'  511210 "AO case, returned to third country"
`l'  511300 "Stay, departure to Dublinentscheid"
`l'  511310 "AuG case, departure to Dublinentscheid"
`l'  511400 "Stay, Returned to Dublin State"
`l'  511410 "AuG Case, Backed in Dublin State"
`l'  511500 "Stay, uncontrolled departure"
`l'  511510 "AO case, uncontrolled departure"
`l'  512000 "Stay, departure after asylum decision"
`l'  512001 "Stay, departure to Asylentscheid, departure with REZ"
`l'  512002 "Stay, departure after asylum decision, with return assistance"
`l'  512500 "Stay, competence with the canton"
`l'  512501 "Stay, competence canton, emigrated with REZ"
`l'  512502 "Stay, competence canton, emigrated with return assistance"
`l'  513000 "Stay, dead"
`l'  513010 "AuG case, died"
`l'  513500 "Stay, depreciation"
`l'  513510 "AuG case, depreciation"
`l'  514000 "AuG case, transfer in asylum process"
`l'  514099 "Completion asylum process inactivated"
`l'  515000 "Dublin procedure"
`l'  515100 "Dublin procedure"
`l'  519900 "Stay, Swiss"


*categories with the same label
replace taet_typ_cd=taet_typ_cd-1 if inlist(taet_typ_cd,11,22,26,28,31,40,51,61,63,68,84,86,88,91)
recode taet_typ_cd (42/47=41)
recode taet_typ_cd (71 72=70)
recode taet_typ_cd (74=70)
recode taet_typ_cd (76 77=75)


loc var taet_typ_cd
cap la drop `var' 
loc l labels `var'
la de `var' 94 "Workers (without a more detailed job description)"
`l'  93 "Other occupations"
`l'  92 "Pastoral care and welfare"
`l'  90 "Education"
`l'  87 "Arts and crafts"
`l'  85 "Science"
`l'  83 "Health"
`l'  82 "Security and organization"
`l'  81 "Legal services"
`l'  80 "Personal hygiene"
`l'  79 "Public hygiene"
`l'  78 "Cleaning"
`l'  75 "Hospitality and housekeeping"
`l'  73 "Communication"
`l'  70 "Traffic"
`l'  69 "Services (without description)"
`l'  67 "Trade"
`l'  66 "Services / Office"
`l'  65 "Services / Office"
`l'  64 "Entrepreneurs, senior civil servants"
`l'  62 "Technical specialists and auxiliary professions"
`l'  60 "Architecture and engineering"
`l'  53 "Crafts (without description)"
`l'  52 "Painting"
`l'  50 "Construction industry"
`l'  49 "Jewelry manufacture"
`l'  48 "Clock making"
`l'  41 "Mechanical engineering, metal production and processing"
`l'  39 "Stone, earth and glass processing"
`l'  38 "Plastics production and processing"
`l'  37 "Chemical industry"
`l'  36 "Leather manufacture and leather processing"
`l'  35 "Printing works"
`l'  34 "Graphic arts"
`l'  33 "Paper making and paper processing"
`l'  32 "Cork processing"
`l'  30 "Woodworking"
`l'  27 "Textile processing"
`l'  25 "Textile manufacture and textile finishing"
`l'  24 "Tobacco processing"
`l'  21 "Food production and processing"
`l'  20 "Mining, mineral production and processing"
`l'  14 "Forestry, fishing and hunting"
`l'  13 "Animal breeding and animal husbandry"
`l'  12 "Horticulture"
`l'  10 "Agriculture"
`l'  -1 "Unknown"
`l'  -2 "Without specification"
 


loc var stus_pz_cd
cap la drop `var' 
loc l labels `var'
la de `var' 415 "VU Abs / Rüz departure organization"
`l'  414 "VU Abs / Rüz Paper Supply"
`l'  413 "VU AuG Departure organization"
`l'  412 "VU AuG Paper Supply"
`l'  411 "VU after asylum decision Departure organization"
`l'  410 "VU after asylum decision paper procurement"
`l'  408 "Time limit expired> 40 days"
`l'  407 "Exit date expired <= 40 days"
`l'  406 "Exit time"
`l'  405 "Recourse asylum decision"
`l'  404 "Complaint period running or RK outstanding"
`l'  403 "First instance decision"
`l'  402 "Canton consultation process"
`l'  401 "Federal consultation process"
`l'  329 "Dublin Specialties"
`l'  323 "Dublin translation"
`l'  322 "Dublin Remonstration"
`l'  321 "Dublin application"
`l'  320 "Dublin Information Request"
`l'  319 "Specialties AUG (including detention from ECZ)"
`l'  311 "VU AuG Departure organization"
`l'  310 "VU AuG Paper Supply"
`l'  309 "Special asylum"
`l'  306 "Exit process"
`l'  305 "VU asylum departure organization"
`l'  304 "VU Asylum procurement"
`l'  303 "Status tentatively recorded"
`l'  302 "Right force process"
`l'  301 "Asylum decision process"
`l'  220 "Dublin procedure"
`l'  210 "AuG cases"
`l'  209 "Specialties"
`l'  205 "Enforcement process"
`l'  204 "Status tentatively recorded"
`l'  203 "Process process"
`l'  202 "Entry process"
`l'  201 "Entry application process"
`l'  120 "Dublin procedure"
`l'  110 "AuG cases"
`l'  102 "Asylum process in Switzerland"
`l'  101 "Preprocessing"
`l'  10  "Suspension Wegweisungs AuG"
`l'  2   "Suspension Wegweisung"
`l'  1   "Treatment"
`l'  -1  "Unknown"
`l'  -2  "Without specification"


la val stus_pz1_cd stus_pz2_cd stus_pz_cd

   
foreach x in stus_flag arb_stell_cd bra_typ_cd ethn_cd evz_cd  isa_kz pz1_e_akt_cd reli_cd spr_cd stus_pz_cd taet_typ_cd ziv_cd {
la val `x' `x'
}

la val reli_cd_full reli_cd

replace kt_kz=trim(kt_kz)
replace kt_kz = "Unknown" if kt_kz =="?"
replace kt_kz = "Without Spec" if kt_kz =="!" // Without specification

g cant_res = "Without Spec" if gem_cd==-2 // current canton
replace cant_res = "Unknown" if gem_cd==-1 
cap pr drop c
pr de c
	replace cant_res = "`1'" if gem_cd>=`2' & gem_cd<=`3' 
end

*based on excel file on population from Swiss statistics (checked wikipedia for changes of municipalities)
c ZH 1 298 // 
c BE 301 996 
c LU 1001 1151 
c UR 1201 1220 
c SZ 1301 1375
c OW 1401 1407
c NW 1501 1511
c GL 1601 1632 
c ZG 1701 1711
c FR 2001 2338 
c SO 2401 2622
c BS  2701 2703
c BL 2761 2895
c SH 2901 2974
c AR 3001 3038
c AI 3101 3111
c SG 3201 3444 
c GR 3501 3987
c AG 4001 4323
c TG 4401 4951
c TI 5001 5398 
c VD 5401 5939 
c VS 6001 6300
c NE 6401 6512 
c GE 6601 6645
c JU 6701 6810 
